package com.gnerv.pabu.boot.zuul;

import com.gnerv.pabu.boot.zuul.filter.AccountFilter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
@ComponentScan(basePackages = {"com.gnerv.pabu"})
@EnableEurekaClient
@EnableZuulProxy
public class BootZuulApplication {

    public static void main(String[] args) {
        SpringApplication.run(BootZuulApplication.class, args);
    }

    @Bean
    public AccountFilter accountFilter(){
        return new AccountFilter();
    }

}
